<template>
  <el-card>
    <h1
      style="
        text-align: center;
        margin-bottom: 16px;
        font-weight: bold;
        font-size: large;
      "
    >
      发布新课程
    </h1>
    <el-steps
      :active="3"
      process-status="wait"
      finish-status="success"
      style="margin-bottom: 40px"
    >
      <el-step title="填写课程基本信息" />
      <el-step title="创建课程大纲" />
      <el-step title="最终发布" />
    </el-steps>

    <el-form>
      <el-form-item>
        <el-button @click="previous">上一步</el-button>
        <el-button :disabled="saveBtnDisabled" type="primary" @click="next"
          >最终发布</el-button
        >
      </el-form-item>
    </el-form>
  </el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'

const $router = useRouter()

const saveBtnDisabled = ref<boolean>(false)

// console.log($router)
const active = ref(1)

const previous = () => {
  $router.push({
    path: '/course/chapter/1'
  })
  console.log(active.value)
}

const next = () => {
  $router.push({
    path: '/course/publish/1'
  })
  console.log(active.value)
}
</script>

<style scoped></style>
